package com.bawei.mvvmzonghe.dao;

import com.bawei.mvvmzonghe.entity.GoodsEntity;

import java.util.List;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

/**
 * @Author : yaotianxue
 * @Time : On 2023/9/15 11:08
 * @Description : GoodsDao
 */
@Dao
public interface GoodsDao {
    //插入数据
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(List<GoodsEntity.ListBean> list);

    @Query("select * from goods")
    LiveData<List<GoodsEntity.ListBean>> getGoods();

}
